feat(spawn): add --model to launch spawned agents on a chosen model#220
Merged
Conversation
`spawn.sh --model <id>` launches the agent on a specific model. The id is pass-through — handed to the CLI unchecked (the CLI rejects an unknown id), so agmsg never has to track each vendor's model list, which would go stale. The model FLAG spelling differs per CLI, so it comes from the manifest `model_arg=`: claude-code uses `--model`, codex uses `-m`. A type with no model_arg has no known flag, so `--model` is refused with a clear error rather than guessed. The flag is inserted into the direct-CLI launch between the binary and the actas prompt. Tests: per-type flag spelling lands in the boot script (claude `--model`, codex `-m`); a type with no model_arg is refused; no --model leaves the launch flag-free.
7e16aef to
c1cad2c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds
spawn.sh --model <id>to launch a spawned agent on a specific model.How
model_arg=(claude-code→--model,codex→-m). The flag is inserted into the direct-CLI launch between the binary and the actas prompt.model_arghas no known flag, so--modelis refused withagent type 'X' does not support --modelrather than guessed.Tests
--modellands the per-type flag in the boot script (claude--model <id>, codex-m <id>).--modelon a type with nomodel_argerrors clearly.--modelleaves the launch flag-free.Per-type
model_argAdded for the spawnable types:
claude-code→--model,codex→-m,grok-build→--model. The motivating case is/agmsg spawn grok-build <name> --model grok-build— spawning grok on the grok-build model (X search needs it; the composer-fast default can't). gemini/cursor aren't spawnable, so they don't need it yet.Rebased onto
mainafter #216 (grok-build) and #219 (delivery scoping) landed.Closes #135.